package com.kim.androidbase.base64;


public class Base64Util {

	/**
	 * 获取base64编码后的字符串
	 * 
	 * @param originalStr
	 * @return
	 */
	public static String getBase64EncodingData(String originalStr) {
		if (originalStr == null) {
			return null;
		}
		return new String(BASE64Coder.encode(originalStr.getBytes()));
	}

	/**
	 * 获取base64解码后的字符串
	 * 
	 * @param base64Str
	 * @return
	 */
	public static String getBase64DecodingData(String base64Str) {
		if (base64Str == null) {
			return null;
		}
		return new String(BASE64Coder.decodeBuffer(base64Str.getBytes()));
	}
}
